﻿using System;
using System.Collections.Generic;
using System.Text;

using Toenda.Foundation.Types;

namespace Toenda.Foundation.Messaging {
	/// <summary>
	/// Provides a interface for the <see cref="MessageManager" />.
	/// </summary>
	public interface IMessagingInfo {
		/// <summary>
		/// Sends the message.
		/// </summary>
		/// <param name="message">The message.</param>
		/// <returns></returns>
		/// <remarks></remarks>
		bool SendMessage(Message message);

		/// <summary>
		/// Gets the messages.
		/// </summary>
		/// <param name="userId">The user id.</param>
		/// <param name="fromUserId">From user id.</param>
		/// <param name="sortParams">The sort params.</param>
		/// <returns></returns>
		/// <remarks></remarks>
		ICollection<Message> GetMessages(int? userId, int? fromUserId, IList<MessageSortParam> sortParams);

		/// <summary>
		/// Changes the message read state.
		/// </summary>
		/// <param name="messageId">The message id.</param>
		/// <param name="isRead">The is read.</param>
		/// <remarks></remarks>
		void ChangeMessageRead(long messageId, bool isRead);

		/// <summary>
		/// Deletes the message.
		/// </summary>
		/// <param name="messageId">The message id.</param>
		/// <returns></returns>
		/// <remarks></remarks>
		bool DeleteMessage(long messageId);

		/// <summary>
		/// Gets the message.
		/// </summary>
		/// <param name="messageId">The message id.</param>
		/// <returns></returns>
		/// <remarks></remarks>
		Message GetMessage(long messageId);
	}
}
